microbenchmarks: extend all to additional low-precision dtypes, restructure GEMM - #714
Open
matthiasdiener wants to merge 2 commits into
Open
microbenchmarks: extend all to additional low-precision dtypes, restructure GEMM#714matthiasdiener wants to merge 2 commits into
matthiasdiener wants to merge 2 commits into
Conversation
matthiasdiener
marked this pull request as ready for review
August 25, 2026 15:18
matthiasdiener
requested review from
ipanfilo,
wangye805 and
wenchenvincent
as code owners
August 25, 2026 15:18
matthiasdiener
requested review from
Micky774 and
alextmagro
and
a balanced review from Copilot
August 25, 2026 15:19
Contributor
There was a problem hiding this comment.
Pull request overview
Consolidates microbenchmarks around shared precision recipes and expands low-precision coverage.
Changes:
- Adds shared BF16, FP8, MXFP8, MXFP4, and NVFP4 recipe selection.
- Extends GEMM, grouped GEMM, casting, and normalization benchmarks.
- Merges the standalone FP8 GEMM benchmark into the dense GEMM benchmark.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
benchmarks/microbenchmarks/utils.py |
Adds shared recipe construction and support checks. |
benchmarks/microbenchmarks/README.md |
Documents expanded precision coverage. |
benchmarks/microbenchmarks/benchmark_normalization.py |
Adds quantized-output forward benchmarks. |
benchmarks/microbenchmarks/benchmark_grouped_gemm.py |
Adds low-precision grouped GEMM sweeps. |
benchmarks/microbenchmarks/benchmark_gemm.py |
Adds unified precision sweeps. |
benchmarks/microbenchmarks/benchmark_gemm_fp8.py |
Removes the superseded standalone FP8 benchmark. |
benchmarks/microbenchmarks/benchmark_casting.py |
Adds MXFP8, NVFP4, and MXFP4 casting cases. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+49
to
+57
| # Forward output bytes/elem by precision (input is always bf16 = 2 bytes/elem): | ||
| # bf16 : 2.0 | ||
| # fp8 : 1.0 (E4M3/E5M2 data, per-tensor scale ~ 0) | ||
| # mxfp8 : 1.0 + 1/32 (+ E8M0 1 byte / 32-elem block) | ||
| _FWD_WRITE_BYTES = { | ||
| "bf16": 2.0, | ||
| "fp8": 1.0, | ||
| "mxfp8": 1.0 + 1.0 / 32, | ||
| } |
alextmagro
approved these changes
Aug 25, 2026
| te.autocast. Precisions whose hardware/runtime support is unavailable on the | ||
| current device are skipped automatically. | ||
|
|
||
| Note: Transformer Engine exposes no MXFP6 recipe (MXFP6 exists only as a |
Contributor
There was a problem hiding this comment.
nit: probably don't need to mention MXFP6 here
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: